<template>
  <div>
    <slider :sliders="sliders.data"></slider>
  </div>
</template>

<script>
import { onMounted, defineComponent, reactive } from 'vue'
import { getRecommend } from '@/service/recommend'
import Slider from '@/components/base/slider/slider'
export default defineComponent({
  name: 'recommend',
  components: {
    Slider
  },
  setup () {
    const sliders = reactive({
      data: []
    })
    onMounted(async () => {
      const result = await getRecommend()
      console.log('recommend', result)
      sliders.data = result.sliders
    })
    return {
      sliders
    }
  }
})
</script>

<style scoped>

</style>
